package ro.toporjinschi.androidorm.test;

import ro.toporjinschi.androidorm.Entity;
import ro.toporjinschi.androidorm.annotation.Column;
import ro.toporjinschi.androidorm.annotation.Id;
import ro.toporjinschi.androidorm.annotation.NamedQueries;
import ro.toporjinschi.androidorm.annotation.NamedQuery;
import ro.toporjinschi.androidorm.annotation.TableName;
import ro.toporjinschi.androidorm.annotation.Transient;
import android.content.ContentValues;

@TableName("places")
@NamedQueries({ @NamedQuery(name = "findAll", sql = "SELECT * FROM places"), @NamedQuery(name = "findById", sql = "SELECT * FROM places WHERE id = {id}"),
        @NamedQuery(name = "findByTown", sql = "SELECT * FROM places WHERE town = {town}") })
public class Place implements Entity {
    @Id
    @Column
    private Integer id;
    @Column
    private String town;
    @Column
    private String streat;
    @Column
    private Integer no;
    @Column
    private String bilding;
    @Column
    private String stairs;
    @Column
    private Integer zipCode;
    @Column
    private String details;
    @Transient
    private Integer x;

    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTown() {
        return this.town;
    }

    public void setTown(String town) {
        this.town = town;
    }

    public String getStreat() {
        return this.streat;
    }

    public void setStreat(String streat) {
        this.streat = streat;
    }

    public Integer getNo() {
        return this.no;
    }

    public void setNo(Integer no) {
        this.no = no;
    }

    public String getBilding() {
        return this.bilding;
    }

    public void setBilding(String bilding) {
        this.bilding = bilding;
    }

    public String getStairs() {
        return this.stairs;
    }

    public void setStairs(String stairs) {
        this.stairs = stairs;
    }

    public Integer getZipCode() {
        return this.zipCode;
    }

    public void setZipCode(Integer zipCode) {
        this.zipCode = zipCode;
    }

    public String getDetails() {
        return this.details;
    }

    public void setDetails(String details) {
        this.details = details;
    }

    public ContentValues getContentValues() {
        final ContentValues cv = new ContentValues();
        // if (id != null){
        // cv.put("id", value)
        // }
        return cv;
    }
}